package routers

import (
	"github.com/gin-gonic/gin"
	jwt "github.com/golangblogs/gojwt"
	"month6/client/routers/handler"
)

func LoadApiRouter(r *gin.Engine) {
	r.POST("/superLogin", handler.SuperLogin)
	r.GET("/listClass", handler.ListClass)
	r.GET("/detailClass", handler.DetailClass)
	r.POST("/updatedClass/status", handler.UpdatedClassStatus)
	r.POST("/addRob", handler.AddRob)
	r.POST("/userBuyClass", handler.UserBuyClass)
	r.GET("/BrowseList", handler.BrowseList)
	r.GET("/BrowseList2", handler.BrowseList2)
	r.GET("/AliPay", handler.AliPay)

	r.Use(jwt.JWTAuth("month6")).POST("/addClass", handler.AddClass)
	r.Use(jwt.JWTAuth("month6")).POST("/AddOrder", handler.AddOrder)
}
